Optimal. Leaf size=277 \[ -\frac {2^{-1-n} e^{i (a-c n)+i (b-d n) x+i n (c+d x)} \left (1+e^{2 i c+2 i d x}\right )^{-n} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n \, _2F_1\left (-n,\frac {b-d n}{2 d};\frac {1}{2} \left (2+\frac {b}{d}-n\right );-e^{2 i (c+d x)}\right )}{b-d n}-\frac {2^{-1-n} e^{-i (a+c n)-i (b+d n) x+i n (c+d x)} \left (1+e^{2 i c+2 i d x}\right )^{-n} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n \, _2F_1\left (-n,-\frac {b+d n}{2 d};1-\frac {b+d n}{2 d};-e^{2 i (c+d x)}\right )}{b+d n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.41, antiderivative size = 277, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {4651, 2323,
2285, 2283} \begin {gather*} -\frac {2^{-n-1} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n \left (1+e^{2 i c+2 i d x}\right )^{-n} \, _2F_1\left (-n,\frac {b-d n}{2 d};\frac {1}{2} \left (\frac {b}{d}-n+2\right );-e^{2 i (c+d x)}\right ) \exp (i (a-c n)+i x (b-d n)+i n (c+d x))}{b-d n}-\frac {2^{-n-1} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n \left (1+e^{2 i c+2 i d x}\right )^{-n} \, _2F_1\left (-n,-\frac {b+d n}{2 d};1-\frac {b+d n}{2 d};-e^{2 i (c+d x)}\right ) \exp (-i (a+c n)-i x (b+d n)+i n (c+d x))}{b+d n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2283
Rule 2285
Rule 2323
Rule 4651
Rubi steps
\begin {align*} \int \cos ^n(c+d x) \sin (a+b x) \, dx &=2^{-1-n} \int \left (i e^{-i a-i b x} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n-i e^{i a+i b x} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n\right ) \, dx\\ &=\left (i 2^{-1-n}\right ) \int e^{-i a-i b x} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n \, dx-\left (i 2^{-1-n}\right ) \int e^{i a+i b x} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n \, dx\\ &=\left (i 2^{-1-n} e^{i n (c+d x)} \left (1+e^{2 i c+2 i d x}\right )^{-n} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n\right ) \int e^{-i a-i b x-i n (c+d x)} \left (1+e^{2 i c+2 i d x}\right )^n \, dx-\left (i 2^{-1-n} e^{i n (c+d x)} \left (1+e^{2 i c+2 i d x}\right )^{-n} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n\right ) \int e^{i a+i b x-i n (c+d x)} \left (1+e^{2 i c+2 i d x}\right )^n \, dx\\ &=-\left (\left (i 2^{-1-n} e^{i n (c+d x)} \left (1+e^{2 i c+2 i d x}\right )^{-n} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n\right ) \int e^{i (a-c n)+i (b-d n) x} \left (1+e^{2 i c+2 i d x}\right )^n \, dx\right )+\left (i 2^{-1-n} e^{i n (c+d x)} \left (1+e^{2 i c+2 i d x}\right )^{-n} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n\right ) \int e^{-i (a+c n)-i (b+d n) x} \left (1+e^{2 i c+2 i d x}\right )^n \, dx\\ &=-\frac {2^{-1-n} \exp (i (a-c n)+i (b-d n) x+i n (c+d x)) \left (1+e^{2 i c+2 i d x}\right )^{-n} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n \, _2F_1\left (-n,\frac {b-d n}{2 d};\frac {1}{2} \left (2+\frac {b}{d}-n\right );-e^{2 i (c+d x)}\right )}{b-d n}-\frac {2^{-1-n} \exp (-i (a+c n)-i (b+d n) x+i n (c+d x)) \left (1+e^{2 i c+2 i d x}\right )^{-n} \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^n \, _2F_1\left (-n,-\frac {b+d n}{2 d};1-\frac {b+d n}{2 d};-e^{2 i (c+d x)}\right )}{b+d n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.93, size = 203, normalized size = 0.73 \begin {gather*} -\frac {2^{-1-n} e^{-i b x} \left (1+e^{2 i (c+d x)}\right )^{-n} \left (e^{-i (c+d x)} \left (1+e^{2 i (c+d x)}\right )\right )^n \left ((b-d n) \, _2F_1\left (-n,-\frac {b+d n}{2 d};-\frac {b+d (-2+n)}{2 d};-e^{2 i (c+d x)}\right ) (\cos (a)-i \sin (a))+e^{2 i b x} (b+d n) \, _2F_1\left (-n,\frac {b-d n}{2 d};\frac {1}{2} \left (2+\frac {b}{d}-n\right );-e^{2 i (c+d x)}\right ) (\cos (a)+i \sin (a))\right )}{(b-d n) (b+d n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.03, size = 0, normalized size = 0.00 \[\int \left (\cos ^{n}\left (d x +c \right )\right ) \sin \left (b x +a \right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\cos \left (c+d\,x\right )}^n\,\sin \left (a+b\,x\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________